/**
 * Created by aresn on 16/8/22.
 */
import App from './views/app.vue';
import AppChief from './views/appChief.vue';
import AppSale from './views/appSale.vue';
import Index from './views/index.vue';
import home from './views/home.vue';
const routers = {
    '/login': {
        component (resolve) {
            require(['./views/login.vue'], resolve);
        }
    },
    '/password': {
        component (resolve) {
            require(['./views/password.vue'], resolve);
        }
    },
    '/app/':{
        component:App,
        subRoutes: {
            '/center/query': {
                component (resolve) {
                    require(['./views/finance/query.vue'], resolve);
                }
            },
            '/sum': {
                component (resolve) {
                    require(['./views/finance/sum.vue'], resolve);
                }
            },
            '/all': {
                component (resolve) {
                    require(['./views/finance/all.vue'], resolve);
                }
            },
            '/home': {
                component:home
            },
            '/productList': {
                component (resolve) {
                    require(['./views/product/allProducts.vue'], resolve);
                }
            },
            '/productApply': {
                component (resolve) {
                    require(['./views/product/apply.vue'], resolve);
                }
            },
            '/datapro': {
                component (resolve) {
                    require(['./views/use/dataPro.vue'], resolve);
                }
            },
            '/badinfor': {
                component (resolve) {
                    require(['./views/use/badInfor.vue'], resolve);
                }
            },
            '/cardinfor': {
                component (resolve) {
                    require(['./views/use/cardInfor.vue'], resolve);
                }
            },
            '/idinfor': {
                component (resolve) {
                    require(['./views/use/idInfor.vue'], resolve);
                }
            },
            '/photopro': {
                component (resolve) {
                    require(['./views/use/photoPro.vue'], resolve);
                }
            },
        }
    },
    '/appSale/':{
        component:AppSale,
        subRoutes: {
            '/client': {
                component (resolve) {
                    require(['./views/sale/client.vue'], resolve);
                }
            },
            '/clientManage': {
                component (resolve) {
                    require(['./views/sale/clientManage.vue'], resolve);
                }
            },
            '/productList': {
                component (resolve) {
                    require(['./views/product/allProducts.vue'], resolve);
                }
            },
            '/clientDetail': {
                component (resolve) {
                    require(['./views/sale/clientDetail.vue'], resolve);
                }
            },
            
        }
    }
};
export default routers;
